package com.csglxt.domain;

import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;

/**
 * 
 * @ClassName: Goods
 * @Description: 商品实体
 * @author Delver_Si
 * @date 2015-5-11 下午10:31:06
 * 
 */

@SuppressWarnings("serial")
public class Goods implements java.io.Serializable {

    // Fields

    private String id;
    private GoodsCate goodsCate;
    private String name;
    private BigDecimal price;
    private String desc;

    private Storage storage;

    private Set<OrderItem> orderItems = new HashSet<OrderItem>();

    private Set<OnshelvesInfo> onshelvesInfos = new HashSet<OnshelvesInfo>();

    // Constructors

    public Storage getStorage() {
        return storage;
    }

    public Set<OnshelvesInfo> getOnshelvesInfos() {
        return onshelvesInfos;
    }

    public void setOnshelvesInfos(Set<OnshelvesInfo> onshelvesInfos) {
        this.onshelvesInfos = onshelvesInfos;
    }

    public Set<OrderItem> getOrderItems() {
        return orderItems;
    }

    public void setOrderItems(Set<OrderItem> orderItems) {
        this.orderItems = orderItems;
    }

    public void setStorage(Storage storage) {
        this.storage = storage;
    }

    public Goods(String id) {
        super();
        this.id = id;
    }

    /** default constructor */
    public Goods() {
    }

    /** full constructor */
    public Goods(GoodsCate goodsCate, String name, BigDecimal price, String desc) {
        this.goodsCate = goodsCate;
        this.name = name;
        this.price = price;
        this.desc = desc;
    }

    // Property accessors

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public GoodsCate getGoodsCate() {
        return this.goodsCate;
    }

    public void setGoodsCate(GoodsCate goodsCate) {
        this.goodsCate = goodsCate;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getPrice() {
        return this.price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Override
    public String toString() {
        return "Goods [id=" + id + ", goodsCate=" + goodsCate + ", name="
                + name + ", price=" + price + ", desc=" + desc + "]";
    }

}